﻿using System;
using Wintellect.PowerCollections;

class ShipDamage
{
    static void Main()
    {
        string input = Console.ReadLine();
        //make some shits
        int positionX1 = int.Parse(input);
        input = Console.ReadLine();
        int positionY1 = int.Parse(input);
        input = Console.ReadLine();
        int positionX2 = int.Parse(input);
        input = Console.ReadLine();
        int positionY2 = int.Parse(input);
        input = Console.ReadLine();
        int h = int.Parse(input);
        int result = 0;

        /*yey
         * making comments and shit
         * 
         */


        int[] coordinatesByX = new int[3];
        int[] coordinatesByY = new int[3];
        for (int i = 0; i < 3; i++)
        {
            input = Console.ReadLine();
            coordinatesByX[i] = int.Parse(input);
            input = Console.ReadLine();
            coordinatesByY[i] = int.Parse(input);
            coordinatesByY[i] = (h - coordinatesByY[i]) * 2 + coordinatesByY[i];
        }

        int top = (positionY1 > positionY2) ? positionY1 : positionY2;
        int bottom = (positionY1 < positionY2) ? positionY1 : positionY2;
        int left = (positionX1 < positionX2) ? positionX1 : positionX2;
        int right = (positionX1 > positionX2) ? positionX1 : positionX2;

        for (int i = 0; i < 3; i++)
        {
            if ((left < coordinatesByX[i] && coordinatesByX[i] < right) && (bottom < coordinatesByY[i] && coordinatesByY[i] < top))
            {
                result += 100;
                continue;
            }
            if ((coordinatesByX[i] == left || coordinatesByX[i] == right) && (coordinatesByY[i] == top || coordinatesByY[i] == bottom))
            {
                result += 25;
                continue;
            }
            if ((coordinatesByX[i] == left || coordinatesByX[i] == right) && (bottom < coordinatesByY[i] || coordinatesByY[i] < top))
            {
                result += 50;
                continue;
            }
            if ((left < coordinatesByX[i] || coordinatesByX[i] < right) && (coordinatesByY[i] == top || coordinatesByY[i] == bottom))
            {
                result += 50;
                continue;
            }

        }
        Console.WriteLine("{0}%", result);
    }
}